import Vue from 'vue';
import axios from 'axios';

const http = {
  install () {
    Vue.prototype.get = function (url, ok, errorcallback) {
      axios
        .get(url)
        .then(response => {
          ok && ok(response.data);
        })
        .catch(error => {
          errorcallback && errorcallback(error);
        })
        .finally();
    };
  }
};
export default http;
